global !p

from mdtex.scopes import text

endglobal

# 需使用 `minted` 包
context "text()"
snippet setminted "minted 设置 minted configure" b
\setminted{
    frame=lines,
    framesep=2mm,
    breaklines,
    baselinestretch=1.2,
    fontsize=\footnotesize,
    linenos
}
endsnippet

context "text()"
snippet code "代码块 Code Block" b
% {{{ $1
\begin{minted}{${2|python,cpp,c|}}
$3
\end{minted}
% }}}
$0
endsnippet

context "text()"
snippet cc "行内代码 Inline Code" w
\texttt{$1} 
endsnippet

context "text()"
snippet vcc "行内代码 Inline Code" w
\verb\`$1\` 
endsnippet
